<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<meta name="description" content="">
	<meta name="author" content="">
	<title>Resource Server &amp; UI</title>
	<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
	<link href="https://getbootstrap.com/docs/4.0/examples/signin/signin.css" rel="stylesheet" crossorigin="anonymous"/>
</head>

<body>
<div class="container">
	<h1 class="form-signin-heading">Resource Server &amp; UI</h1>
	<p>This tutorials demos the configuration of a Spring Boot Application that is both an OAuth2 resource server (a REST API) and an OAuth2 client (a Thymeleaf UI with OAuth2 login) in a multi-tenant environment</p>
	<div th:if="${!isAuthenticated}">
		<p>You have to be authenticated against (at least) one of the configured authorization servers</p>
		<a href="/ui/greet"><button type="button">Login</button></a>
	</div>
	<div th:if="${isAuthenticated}">
		<a href="/ui/greet"><button type="button">Greetings</button></a>
	</div>
</div>
</body>